home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-17 | 2.9 KB | 88 lines | [TEXT/MPS ] |
- #
- # ****************************************************************************
- #
- # File Name: OutPut.Lib
- #
- # Contains: Tasks used for output
- #
- # Written by: Kevin Avoy, Ken Landreth, Michael Leong, Gil Spencer et al
- #
- # Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
- #
- # ****************************************************************************
- # C h a n g e H i s t o r y (most recent first):
- # ****************************************************************************
- #
- # Vers Date Author Description
- # ---- -------- ------ ---------------------------------------------
- # <1.0.5> 12/2/93 KTA LogStr()- added gLogStrHook to do anything custom after logging.
- # <1.0.3> 6/8/93 NAGA unmark tasks that are not published
- # <1.0.2> 5/21/93 NAGA Adding header and porting old files to follow new standards
- #
- # ****************************************************************************
- #
-
- #########################################################################
- # LogStr(str, errorCheck,doTargetCheck)
- #========================================================================
- # Author: KTA
- # Description: Match the target and print it with whatever is passed
- # to it in the 'str' parameter. Set the appropriate
- # LogPriority based on the context of the string.
- # Parameters: str - string to be printed
- # LogPriority - The priority of the string to be printed
- # 0 - No logging
- # 1 - Errors
- # 2 - Comments and Notes
- # 3 - Summary information
- # 4 - More detailed
- # 5 - Detailed description
- # Returns: Nothing
- # Examples: LogStr("It worked");
- # LogStr("It worked",3);
- # Assumptions: None
- #========================================================================
- # History:
- # KTA 12/01/93 Added gLogStrHook
- #########################################################################
- TASK LogStr(str,LogPriority := 5)
- begin
- global gTargetCheck, gAppTitle, gLogLevel,gLogStrCount, gDisableAllLogging;
- theStr := '';
- if (gTargetCheck)
- theStr := TargetInfo();
-
- if (LogPriority <= gLogLevel) and not (gDisableAllLogging)
- begin
- gLogStrCount := gLogStrCount + 1;
- println gLogStrCount," - ",str," {theStr} ";
- end;
- if(global gLogStrHook)
- Call(gLogStrHook);
-
- end; # LogStr()
-
- #########################################################################
- # TargetInfo(theList)
- #========================================================================
- # Author: NJV/KTA
- # Description: Match application running on Target
- # Parameters: nada -
- # Returns: Returns application running on Target
- # Examples:
- #========================================================================
- # History:
- #
- #########################################################################
- task TargetInfo()
- begin
- theDescInfo := match [target t:?TargetTitle a:?App]!;
- theAppTitle :=App[1].t;
-
- if not (theDescInfo)
- return('');
-
- str := "(Target - Application:∂'{theAppTitle}∂')";
- return(str);
- end; # TargetInfo()
-